<!--%import("filter/insert_config.xml")-->
<!--#include("./header.html")-->

<form action="./" method="get" onsubmit="return procFilter(this, insert_config);">

<div class="adminLeftContent">

    <h4 class="xeAdmin">{$lang->max_level}</h4>
    <table cellspacing="0" class="rowTable">
    <tr>
        <td colspan="2">
            <input type="text" class="inputTypeText w80" value="{$config->max_level}" name="max_level" />
            <p>{$lang->about_max_level}</p>
        </td>
    </tr>
    </table>

    <h4 class="xeAdmin">{$lang->point_name}</h4>
    <table cellspacing="0" class="rowTable">
    <tr>
        <td colspan="2">
            <input type="text" class="inputTypeText w80" value="{$config->point_name}" name="point_name" />
            <p>{$lang->about_point_name}</p>
        </td>
    </tr>
    </table>

    <h4 class="xeAdmin">{$lang->is_default}</h4>
    <table cellspacing="0" class="rowTable">
    <tr class="row2">
        <td><div>{$lang->point_signup}</div></td>
        <td>
            <input type="text" class="inputTypeText w80" value="{$config->signup_point}" name="signup_point" /> {$config->point_name}
            <p>{$lang->about_point_signup}</p>
        </td>
    </tr>
    <tr>
        <td><div>{$lang->cmd_login}</div></td>
        <td><input type="text" class="inputTypeText w80" value="{$config->login_point}" name="login_point" /> {$config->point_name}</td>
    </tr>
    <tr class="row2">
        <td><div>{$lang->point_insert_document}</div></td>
        <td><input type="text" name="insert_document" value="{$config->insert_document}" class="inputTypeText w80" /> {$config->point_name}</td>
    </tr>
    <tr>
        <td><div>{$lang->point_insert_comment}</div></td>
        <td><input type="text" name="insert_comment" value="{$config->insert_comment}" class="inputTypeText w80" /> {$config->point_name}</td>
    </tr>
    <tr class="row2">
        <td><div>{$lang->point_upload_file}</div></td>
        <td><input type="text" name="upload_file" value="{$config->upload_file}" class="inputTypeText w80" /> {$config->point_name}</td>
    </tr>
    <tr>
        <td><div>{$lang->point_download_file}</div></td>
        <td><input type="text" name="download_file" value="{$config->download_file}" class="inputTypeText w80" /> {$config->point_name}</td>
    </tr>
    <tr class="row2">
        <td><div>{$lang->point_read_document}</div></td>
        <td><input type="text" name="read_document" value="{$config->read_document}" class="inputTypeText w80" /> {$config->point_name}</td>
    </tr>
    <tr>
        <td><div>{$lang->point_voted}</div></td>
        <td><input type="text" name="voted" value="{$config->voted}" class="inputTypeText w80" /> {$config->point_name}</td>
    </tr>
    <tr class="row2">
        <td><div>{$lang->point_blamed}</div></td>
        <td><input type="text" name="blamed" value="{$config->blamed}" class="inputTypeText w80" /> {$config->point_name}</td>
    </tr>
    </table>

    <h4 class="xeAdmin">{$lang->level_icon}</h4>
    <table cellspacing="0" class="rowTable">
    <tr>
        <td colspan="2">
            <select name="level_icon" class="fullWidth">
            <!--@foreach($level_icon_list as $key => $val)-->
                <option value="{$val}" <!--@if($config->level_icon == $val)-->selected="selected"<!--@end-->>{$val}</option>
            <!--@end-->
            </select>
            <p>{$lang->about_level_icon}</p>
        </td>
    </tr>
    </table>

    <h4 class="xeAdmin">{$lang->disable_download}</h4>
    <table cellspacing="0" class="rowTable">
    <tr>
        <td colspan="2">
            <input type="checkbox" name="disable_download" value="Y" <!--@if($config->disable_download=='Y')-->checked="checked"<!--@end--> />
            <p>{$lang->about_disable_download}</p>
        </td>
    </tr>
    </table>

    <h4 class="xeAdmin">{$lang->disable_read_document}</h4>
    <table cellspacing="0" class="rowTable">
    <tr>
        <td colspan="2">
            <input type="checkbox" name="disable_read_document" value="Y" <!--@if($config->disable_read_document=='Y')-->checked="checked"<!--@end--> />
            <p>{$lang->about_disable_read_document}</p>
        </td>
    </tr>
    </table>

    <table cellspacing="0" class="rowTable">
    <tr>
        <th colspan="2" class="button">
            <span class="button black strong"><input type="submit" value="{$lang->cmd_save}" accesskey="s" /></span>
        </th>
    </tr>
    </table>

    <h4 class="xeAdmin">{$lang->point_link_group}</h4>
    <table cellspacing="0" class="rowTable">
    <thead>
    <tr>
        <th class="half_wide"><div>{$lang->group}<div></th>
        <th class="half_wide"><div>{$lang->level}<div></th>
    </tr>
    </thead>
    <tbody>
    <!--@foreach($group_list as $key => $val)-->
    <tr class="row{$cycle_idx}">
        <td class="center"><div>{$val->title}</div></td>
        <td class="center"><input type="text" class="inputTypeText w80" value="{$config->point_group[$key]}" name="point_group_{$key}" /></td>
    </tr>
    <!--@end-->
    <tr class="row{$cycle_idx}">
        <td colspan="2">
            <select name="group_reset">
                <option value="Y"<!--@if($config->group_reset != 'N')--> selected="selected"<!--@end-->>{$lang->point_group_reset_and_add}</option>
                <option value="N"<!--@if($config->group_reset == 'N')--> selected="selected"<!--@end-->>{$lang->point_group_add_only}</option>
            </select>
        </td>
    </tr>
    <tr>
        <td colspan="2"><p>{$lang->about_point_link_group}</p></td>
    </tr>
    <tr>
        <th colspan="2" class="button">
            <span class="button black strong"><input type="submit" value="{$lang->cmd_save}" accesskey="s" /></span>
        </th>
    </tr>
    </tbody>
    </table>
</div>

<div class="adminRightExtra">
    <h4 class="xeAdmin">{$lang->level_point_calc}</h4>
    <table cellspacing="0" class="rowTable">
    <tr>
        <td><input name="expression" value="{$config->expression}" size="4" class="inputTypeText w100"/> <input type="button" onclick="exp_calc(this.form)" value="{$lang->cmd_exp_calc}" /> <input type="button" onclick="exp_calc(this.form, true)" value="{$lang->cmd_exp_reset}" /><p>{$lang->expression}</p>
        </td>
    </tr>
    </table>

    <h4 class="xeAdmin">{$lang->level_point}</h4>
    <table cellspacing="0" class="rowTable">
    <tr>
        <td>1</td>
        <td><img src="{getUrl()}/modules/point/icons/{$config->level_icon}/1.gif" alt="" /></td>
        <td><input type="text" name="level_step_1" value="{$config->level_step[1]}" class="inputTypeText w80" /> {$config->point_name}</td>
    </tr>
    <!--@for($i=2;$i<=$config->max_level;$i++)-->
    <tr class="row{(($i-1)%2+1)}">
        <td>{$i}</td>
        <td><img src="{getUrl()}/modules/point/icons/{$config->level_icon}/{$i}.gif" alt="" /></td>
        <td><input type="text" id="level_step_{$i}" name="level_step_{$i}" value="{$config->level_step[$i]}" class="inputTypeText w80" /> {$config->point_name}</td>
    </tr>
    <!--@end-->
    <tr>
        <th colspan="4" class="button">
            <span class="button black strong"><input type="submit" value="{$lang->cmd_save}" accesskey="s" /></span>
        </th>
    </tr>
    </table>

    <h4 class="xeAdmin">{$lang->cmd_point_recal}</h4>
    <table cellspacing="0" class="rowTable">
    <tr>
        <td>
            <p>{$lang->about_cmd_point_recal}</p>
            <p id="pointReCal"></p>
        </td>
    </tr>
    <tr>
        <th class="button">
            <span class="button black strong"><input type="button" value="{$lang->cmd_point_recal}" onclick="doPointRecal(); return false;"/></span>
        </td>
    </tr>
    </table>
</div>


</form>
